#ifndef VIEWERWIDGET_H
#define VIEWERWIDGET_H

#include <QWidget>
#include <QObject>
#include <QList>
#include <QDebug>

#include "robot.h"
#include "jointcontrol.h"

class QSlider;
class Robot;
class Core;
class GLWidget;
class JointData;

class viewerWidget : public QWidget
{
	Q_OBJECT

public:
	viewerWidget(Robot *robot, Core *core);
	void setRobot(Robot *robot);

public slots:
	void focusOn(int joint);
	void robotLoaded();
	void resetView();
	
signals:
	void putFocusOn(int);

private:
	QGridLayout *mainLayout;
	Robot *robotPointer;
	Core *corePointer;
	GLWidget *glWidget;
	QList<JointControl*> jointControlList;

	
	JointData *endEffector;
	JointData *userSelected;
	
	void generateControls();
	
	int jointFocus;
 };

#endif
